-
Notifications
You must be signed in to change notification settings - Fork 100
PERL-787: Array Update Improvements #148
Conversation
| multi => $self->multi ? $true : $false, | ||
| upsert => $self->upsert ? $true : $false, | ||
| ( defined $self->collation ? ( collation => $self->collation ) : () ), | ||
| ( defined $self->arrayFilters ? ( arrayFilters => $self->arrayFilters ) : () ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says there are various situations requiring errors: if the server is less than 3.6 or if it's an unacknowledged write with an opcode. You can mirror the "collation" logic in lines 94-101, but you'll need to define "supports_arrayFiltres" in MongoDB::Link as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error messages should be in now for that :)
t/crud_spec.t
Outdated
| subtest $name => sub { | ||
| if ( $name =~ 'arrayFilter' ) { | ||
| my $ver = $feature_comp->output->{featureCompatibilityVersion}; | ||
| $ver = $ver->{version} if ref($ver) eq 'HASH'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pull the "get a version from featureCompatibilityVersion" logic into a helper sub or else just up to the preamble after line 41. I'd like to see the plan skip_all predicate below simplified to something like unless $supports_array_filters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep will do! was debating whether to do that but forgot to come back to it after it was working heh
|
Right have updated the file for factoring out the bit from crud_spec, but have run into a slight concept issue with the featureCompatiblityVersion fetching, re. so, if there is a solution to this, then I can see the implementation being to:
Of course I may have misunderstood some part of this, but as an |
|
I think there are two levels to your question.
What the heck is FCV, perhaps you're asking? :-) It's a flag to tell whether the data files found during database startup are in the current server version format or in the prior server version format. It's an internal indicator to help with upgrade/downgrade. In the 3.8, it's possible that external access to FCV will be removed so that users don't even try to rely on it (as we were doing for testing). |
|
Yea i figured FCV was used for something like that :) As for using the |
unacknowledged writes
|
Looks good. I'll squash and merge and we can fix up the test skipping later. |
Includes update to CRUD spec test files